package com.shop.user.po.dto;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.shop.user.po.AddressBook;
import com.shop.user.po.OrderDetail;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;

import java.util.List;

/**
 * @author 'banxia'
 * @version 1.0
 * @description 订单的详细情况（2张表？）
 * @date 2023/2/28 15:09
 */
@Data
@ToString
public class OrderInfo {

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "订单号id，redis生成全局id")
    private Long orderId;

    @ApiModelProperty(value = "用户ID")
    private Long userId;

    @ApiModelProperty(value = "收获地址ID")
    private Long addressId;

    @ApiModelProperty(value = "收获地址")
    private AddressBook addressBooke;

    @ApiModelProperty(value = "订单状态：0未支持，1支付完成")
    private String state;

    @ApiModelProperty(value = "订单总额：（用分表示）")
    private Long totalAmount;

    @ApiModelProperty(value = "优惠券ID")
    private Long discountId;

    @ApiModelProperty(value = "优惠金额")
    private Long discountPrice;

    @ApiModelProperty(value = "实收金额")
    private Long needAmount;

    @ApiModelProperty(value = "备注")
    private String remarks;

    //----------------------------------------------------------------
    @ApiModelProperty(value = "订单详情表")
    private List<OrderDetail> orderDetailList;

}
